<!doctype html>
<html>
{% load static %}

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>无敌幸运星主界面</title>
    <link href="{% static 'stock/css/index.css' %}" rel="stylesheet" type="text/css">
    <link href="{% static 'stock/common/bootstrap.min.css' %}" rel="stylesheet" type="text/css">
    <link href="{% static 'stock/common/bootstrap-table/bootstrap-table.min.css' %}" rel="stylesheet">


    {#<link rel="stylesheet" type="text/css" href="../../static/stock/css/index.css">#}
    {#<link rel="stylesheet" type="text/css" href="../../static/stock/common/bootstrap.min.css">#}
    {#<link rel="stylesheet" type="text/css" href="../../static/stock/common/bootstrap-table/bootstrap-table.min.css">#}
</head>

<body>
<!--导航栏-->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"><a class="navbar-brand label-success">导航</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span
            class="navbar-toggler-icon"></span></button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            <li> &nbsp;</li>
            <li class="nav-item"><a class="nav-link" href="/stock/condition">条件选股</a></li>
            <li> &nbsp;</li>
            <li class="nav-item"><a class="nav-link" href="#attention-stock">关注股票</a></li>
            <li> &nbsp;</li>
            <li class="nav-item dropdown"><a class="nav-link dropdown-toggle" href="#" id="navbarDropdown1"
                                             role="button" data-toggle="dropdown" aria-haspopup="true"
                                             aria-expanded="false"> 股票信息维护 </a>
                <div class="dropdown-menu" aria-labelledby="navbarDropdown1">
                    <a class="dropdown-item" href="javascript:update_daily()">更新每日交易信息</a>
                    <a class="dropdown-item" href="javascript:update_daily_basic()">更新每日指标信息</a>
                    <a class="dropdown-item" href="javascript:update_block_trade()">更新大宗交易信息</a>
                    <a class="dropdown-item" href="javascript:update_moneyflow()">更新资金流向信息</a>
                    <a class="dropdown-item" href="javascript:update_index_daily()">更新股指信息</a>
                    <a class="dropdown-item" href="javascript:update_all_basic()">更新上述全部信息</a>
                    <div class="dropdown-divider"></div>
                </div>
            </li>

            <li class="nav-item dropdown"><a class="nav-link dropdown-toggle" href="#" id="navbarDropdown3"
                                             role="button" data-toggle="dropdown" aria-haspopup="true"
                                             aria-expanded="false">股票基础数据 </a>
                <div class="dropdown-menu" aria-labelledby="navbarDropdown1">
                    <a class="dropdown-item" href="javascript:update_stockbasic()">更新股票基本信息</a>
                    <a class="dropdown-item" href="javascript:update_company()">更新上市公司信息</a>
                </div>

            </li>

            <li class="nav-item dropdown"><a class="nav-link dropdown-toggle" href="#" id="navbarDropdown3"
                                             role="button" data-toggle="dropdown" aria-haspopup="true"
                                             aria-expanded="false">数据维护 </a>
                <div class="dropdown-menu" aria-labelledby="navbarDropdown1">
                    <a class="dropdown-item" href="javascript:delete_all_stock_info()">删除全部基础数据</a>
{#                    <a class="dropdown-item" href="javascript:"></a>#}
                </div>

            </li>

        </ul>
    </div>
</nav>
<hr style="background-color: #dedee2;height: 2px;border: none;">

<!--股指滚动栏，data-interval="false"时，停止滚动，如不设置默认5000ms滚动-->
<div>
    <div id="carouselExampleIndicators1" class="carousel slide" data-ride="carousel" data-interval="false"
         style="background-color: grey;height: 600px;overflow: auto">
        <ol class="carousel-indicators">
            <li data-target="#carouselExampleIndicators1" data-slide-to="0" class="active"></li>
            <li data-target="#carouselExampleIndicators1" data-slide-to="1"></li>
        </ol>
        <div class="carousel-inner" role="listbox">
            <!--上证综指显示区域-->

            <div class="carousel-item active" style="text-align: center">
                <div id="SSE-container" style="width: 800px;height:600px;  margin: 0 auto">
                </div>
            </div>

            <!--深证成指显示区域-->
            <div class="carousel-item" style="text-align: center">
                <div id="SZSE-container" style="width: 800px;height:600px; margin: 0 auto">
                </div>
            </div>
        </div>
    </div>
</div>
<hr style="background-color: #dedee2;height: 2px;border: none;">

<!--关注和非关注股票滚动栏，data-interval="false"时，停止滚动，如不设置默认5000ms滚动-->
<div>
    <div id="carouselExampleIndicators2" class="carousel slide" data-ride="carousel" data-interval="false"
         style="background-color: grey;height: 600px;overflow: auto">
        <ol class="carousel-indicators">
            <li data-target="#carouselExampleIndicators2" data-slide-to="0" class="active"></li>
            <li data-target="#carouselExampleIndicators2" data-slide-to="1"></li>
        </ol>
        <div class="carousel-inner" role="listbox">
            <div class="carousel-item active">
                <div id="attention-stock">
                    <div class="container-fluid mt-2">
                        <div align="center">

                            <h1 class="text-center">关注列表</h1>
                        </div>
                    </div>
                    <div class="container-fluid">
                        <div id="toolbar1">
                            <button id="cancel_attention_btn" class="btn btn-warning"
                                    onclick="submit_cancel_attention(this)">
                                取消关注选中股票
                            </button>
                            <button class="btn btn-outline-dark" onclick="clear_attention_data(1)">清空列表</button>
                            <button class="btn btn-outline-dark" onclick="refresh_attention_table()">刷新列表</button>
                        </div>
                        <table
                                id="attention_table"
                                class="table-striped table-dark"
                                data-toolbar="#toolbar1"
                                data-search="true"
                                data-toggle="table"
                                data-show-columns="true"
                                data-show-columns-toggle-all="true"
                                {#            data-detail-view="true"#}
                                data-show-export="true"
                                data-click-to-select="true"

                                data-minimum-count-columns="2"
                                data-show-pagination-switch="true"

                                data-sort-class="table-active"
                                data-sortable="true"
                                data-pagination="true"
                                data-page-number="1"
                                data-page-size="5"
                                data-page-list="[5, 10, 25, 50, 100, all]"
                                data-show-footer="true"


                        >
                        </table>
                    </div>
                </div>
            </div>
            <div class="carousel-item">
                <div id="cancel-atttion-stock">
                    <div class="container-fluid mt-2">
                        <div align="center">
                            <h1 class="text-center">已取消关注列表</h1>
                        </div>
                    </div>
                    <div class="container-fluid">
                        <div id="toolbar2">
                            <button id="cancel_attention_btn" class="btn btn-warning"
                                    onclick="submit_afresh_attention(this)">
                                重新关注选中股票
                            </button>
                            <button class="btn btn-outline-dark" onclick="clear_attention_data(0)">清空列表</button>
                            <button class="btn btn-outline-dark" onclick="refresh_cancel_attention_table()">刷新列表</button>
                        </div>
                        <table
                                id="cancel_attention_table"
                                class="table-striped table-dark"
                                data-toolbar="#toolbar2"
                                data-search="true"
                                data-toggle="table"
                                data-show-columns="true"
                                data-show-columns-toggle-all="true"
                                data-click-to-select="true"
                                data-minimum-count-columns="2"
                                data-show-pagination-switch="true"
                                data-sort-class="table-active"
                                data-sortable="true"
                                data-pagination="true"
                                data-page-number="1"
                                data-page-size="5"
                                data-page-list="[5, 10, 25, 50, 100, all]"
                                data-show-footer="true"


                        >
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<hr style="background-color: #dedee2;height: 2px;border: none;">

<!--股票详细信息显示,加载show_selected_stock页面-->
<div id="div_show_stock_detail_info">

    <!--查询框-->
    <div class="bg-dark ">
        <div style="margin-top: 10px;margin-bottom: 10px;padding-top: 10px;padding-bottom: 10px;padding-left: 5px;padding-right: 5px;">

            <div class="inline">
                <label style="color:#ffffff;">股票名称</label></div>
            <div class="inline">
                <input id="input_search_stockinfo" size="40px,"
                       class="mr-sm-2" placeholder="输入股票名称，或代码进行查询" aria-label="Search"
                       list="searchlist"
                       onkeyup="delaySearch(this.value)">
                <datalist id="searchlist">
                </datalist>
            </div>
            <div class="inline">
                <button class="btn btn-outline-success my-2 my-sm-0" id="btn_query_stockinfo"
                        onclick="btn_query_stockinfo_click()">查询
                </button>
            </div>
            <div class="inline">
                <button class="btn btn-outline-success my-2 my-sm-0" id="btn_add_attention"
                        onclick="add_attention_stock()">加入关注
                </button>
            </div>
        </div>
    </div>


    <div id="div_show_selected_stock">

    </div>
</div>


<hr style="background-color: #dedee2;height: 2px;border: none;">


<hr style="background-color: #dedee2;height: 2px;border: none;">

<footer class="text-center">
    <h3>此网站仅用于学习，请尊重相关网站版权，不可用于任何商业用途！！！</h3>
</footer>
<script src="{% static 'stock/common/jquery.js' %}"></script>
<script src="{% static 'stock/common/popper.js' %}"></script>
<script src="{% static 'stock/common/bootstrap.min.js' %}"></script>
<script src="{% static 'stock/common/bootstrap-table/bootstrap-table.min.js' %}"></script>
<script src="{% static 'stock/common/bootstrap-table/bootstrap-table-locale-all.min.js' %}"></script>
<script src="{% static 'stock/common/echarts.min.js' %}"></script>
<script src="{% static 'stock/js/index.js' %}"></script>



<!-- csrf token  -->
<script>
    $.ajaxSetup({
        data: {csrfmiddlewaretoken: '{{ csrf_token }}'},
    });
</script>
{#<script src="../../static/stock/common/jquery.js"></script>#}
{#<script src="../../static/stock/common/bootstrap.min.js"></script>#}
{#<script src="../../static/stock/common/popper.js"></script>#}
{#<script src="../../static/stock/common/echarts.min.js"></script>#}
{#<script src="../../static/stock/common/bootstrap-table.min.js"></script>#}
{#<script src="../../static/stock/common/bootstrap-table-locale-all.min.js"></script>#}
{#<script src="../../static/stock/js/index.js"></script>#}

<!-- 统计信息，不需要刻意删除  -->
<script type="text/javascript">document.write(unescape("%3Cspan id='cnzz_stat_icon_1278838836'%3E%3C/span%3E%3Cscript src='https://s9.cnzz.com/z_stat.php%3Fid%3D1278838836%26online%3D1%26show%3Dline' type='text/javascript'%3E%3C/script%3E"));</script>
</body>
</html>
